/*
 * =====================================================================================
 *       Filename:  factory.h
 *         Author:  MIEN
 *    Description:  队列工厂
 *           Date:  2015-07-10
 * =====================================================================================
 */

#include "lib/dict.h"
#include "queue.h"

#ifndef QUEUE_FACTORY_H
#define QUEUE_FACTORY_H

void factoryCreate();
void factoryFree();
void factoryDump();
void factoryRestore();

void factoryIn(char *queue_name, char *data);
char *factoryOut(char *queue_name);

int factorySub(char *queue_name, char *url, int number, int interval);
int factoryUnsub(char *queue_name, char *url);

queue *factoryGetQueue(char *queue_name);
void factoryAddQueue(char *queue_name);
void factoryDelQueue(char *queue_name);

dictTable *factoryGetQueuesTable();

#endif /* QUEUE_FACTORY_H */
